package com.itheima.controller;

import com.itheima.common.domain.AjaxResult;
import com.itheima.order.entity.OmsOrderReturnApply;
import com.itheima.service.OmsPortalOrderReturnApplyService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
//关于前台退单
@Slf4j
@RestController
@RequestMapping("/returnApply")
public class OmsPortalOrderReturnApplyController {

    @Autowired
    private OmsPortalOrderReturnApplyService omsPortalOrderReturnApplyService;

    /**前台退单
     *
     * @param omsOrderReturnApply
     * @return
     */
    @PostMapping("/create")
    private AjaxResult create(@RequestBody OmsOrderReturnApply omsOrderReturnApply){
        omsPortalOrderReturnApplyService.save(omsOrderReturnApply);
        return AjaxResult.success();
    }
}
